package com.hu.video.mapper;

import com.hu.video.entity.VideoBlacklist;
import org.apache.ibatis.annotations.*;
import java.util.List;

@Mapper
public interface VideoBlacklistMapper {
    @Select("SELECT * FROM video_blacklist WHERE video_id = #{videoId}")
    List<VideoBlacklist> selectByVideoId(Long videoId);

    @Insert("INSERT INTO video_blacklist (video_id, blocked_user_id, create_time) VALUES (#{videoId}, #{blockedUserId}, NOW())")
    int insert(VideoBlacklist blacklist);

    @Delete("DELETE FROM video_blacklist WHERE video_id = #{videoId} AND blocked_user_id = #{blockedUserId}")
    int delete(VideoBlacklist blacklist);
} 